
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="../js/jquery-3.4.1min.js"></script>
		<link rel="stylesheet" href="../css/bootstrap.min.css">
		<script src="../js/popper.min.js"></script>
		<script src="../js/bootstrap.min.js"></script>
		<script type="text/javascript">
			$(function () {
				var list = []
				getE()
				function getE(name="") {
					$.ajax({
						url:"/exhibition/getExhibition",
						data:{"name":name},
						type:"post",
						dateType:"json",
						success:function (data){
							console.log(data)
							list = data;
							x(list)
						}
					})
				}
				$("#likeS").blur(function () {
					var value=$("#likeS").val();
					getE(value)
				})
				function x(l) {
					$("#conListE").empty();
					for (const ex of l) {
						console.log(ex.etitle)
						$('#conListE').append("<div class='col mb-4'> <div class='card'> <img src='"+ex.epic+"' class='card-img-top' alt='...'> <div class='card-body'> <h5 class='card-title'>"+ex.etitle+"</h5> <p class='card-text'>"+ex.ebody+"</p> <p class='card-text'>"+ex.ebegin+"到"+ex.etime+"</p><a href='/exhibition/getExById?eid="+ex.eid+"' class='card-link'>去购票</a></div> </div> </div>")
					}
				}
			})
		</script>
	</head>
	<body>
		<div class="jumbotron jumbotron-fluid">
			<div class="container">
				<h1 class="display-4">COS售票中心</h1>
				<p class="lead">This is a modified jumbotron that occupies the entire horizontal space of its parent.
				</p>
			</div>
		</div>

		<div class="container">
			<div class="row"style="margin-bottom: 50px;">
				<div class="col-sm">
				</div>
				<div class="col-sm">
					<div class="input-group" style="width: 1100px;">
						<input type="text" class="form-control" id="likeS" aria-label="Text input with dropdown button">
					</div>
				</div>
				<div class="col-sm">
				</div>
			</div>
			<div class="row row-cols-1 row-cols-md-3" id="conListE">
			</div>
		</div>
	</body>
</html>
